Adwaita: add vertically linked combos
authorLapo Calamandrei <calamandrei@gmail.com>
Sat, 4 Oct 2014 22:56:48 +0000 (00:56 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Sat, 4 Oct 2014 22:56:48 +0000 (00:56 +0200)
gtk/resources/theme/Adwaita/_common.scss
gtk/resources/theme/Adwaita/gtk-contained-dark.css
gtk/resources/theme/Adwaita/gtk-contained.css

index 16e3ec69dc4d1572ee97cfda2310bc640c6eeae9..c5174dc9afe019336745f8556778a8dd0703cce7 100644 (file)
@@ -328,7 +328,7 @@ GtkTextView { // This will get overridden by .view, needed by gedit line numbers
     &:backdrop { color: mix($backdrop_fg_color,$backdrop_base_color,80%); }
   }
 
-  .linked.vertical & {
+  .linked.vertical & { //FIXME comment stuff and make the whole thing smarter.
     @include entry(normal, $edge: none);
     background-image: linear-gradient(to bottom, $base_color);
     border-bottom-color: mix($borders_color, $base_color, 30%);
@@ -754,9 +754,14 @@ $_dot_color: if($variant=='light', $selected_bg_color,
   }
 }
 
-%linked_vertical{
+%linked_vertical_middle {
   border-left-style: solid;
   border-top-style: none;
+  border-radius: 0;
+}
+
+%linked_vertical{
+  @extend %linked_vertical_middle;
   &:first-child {
     border-style: solid;
     border-radius: 3px 3px 0 0;
@@ -879,7 +884,7 @@ GtkColorButton.button {
       &:dir(rtl) { border-style: none solid none none; }
     }
   }
-  &.vertical, &.vertical:dir(rtl) {
+  &.vertical, &.vertical:dir(rtl) { //FIXME: try using linking templates for vertically linked stuff
     .button {
       padding-top: 8px;    //  Same vertical padding as image-buttons
       padding-bottom: 8px; //
@@ -1013,6 +1018,14 @@ GtkComboBox {
 .linked > GtkComboBox:only-child > .button {
   @extend %linked:only-child;
 }
+.linked.vertical > GtkComboBoxText > .button,
+.linked.vertical > GtkComboBox > .button { @extend %linked_vertical_middle; }
+.linked.vertical > GtkComboBoxText:first-child > .button,
+.linked.vertical > GtkComboBox:first-child > .button { @extend %linked_vertical:first-child; }
+.linked.vertical > GtkComboBoxText:last-child > .button,
+.linked.vertical > GtkComboBox:last-child > .button { @extend %linked_vertical:last-child; }
+.linked.vertical > GtkComboBoxText:only-child > .button,
+.linked.vertical > GtkComboBox:only-child > .button { @extend %linked_vertical:only-child; }
 
 /************
  * Toolbars *
index 6da46cf9ac94d96df7d9b27aa6408d8cecdf7847..c397239ca8d2b369cd81b667dccf045490e6005b 100644 (file)
@@ -1192,17 +1192,23 @@ GtkCalendar.header .inline-toolbar GtkToolButton:backdrop:only-child > .button.t
   border-radius: 3px;
   border-style: solid; }
 
-.linked.vertical .entry, .linked.vertical .entry:focus, .linked.vertical .entry:insensitive, .linked.vertical .entry:insensitive:backdrop, .linked.vertical .entry:backdrop, .linked.vertical .entry:last-child:focus, .linked.vertical .button, .linked.vertical .button:hover, .linked.vertical .button:active, .linked.vertical .button:checked, .linked.vertical .button:backdrop {
+.linked.vertical .entry, .linked.vertical .entry:focus, .linked.vertical .entry:insensitive, .linked.vertical .entry:insensitive:backdrop, .linked.vertical .entry:backdrop, .linked.vertical .entry:last-child:focus, .linked.vertical .button, .linked.vertical .button:hover, .linked.vertical .button:active, .linked.vertical .button:checked, .linked.vertical .button:backdrop, .linked.vertical > GtkComboBoxText > .button,
+.linked.vertical > GtkComboBox > .button {
   border-left-style: solid;
-  border-top-style: none; }
-  .linked.vertical .entry:first-child, .linked.vertical .entry:first-child:last-child:focus, .linked.vertical .button:first-child {
-    border-style: solid;
-    border-radius: 3px 3px 0 0; }
-  .linked.vertical .entry:last-child, .linked.vertical .button:last-child {
-    border-radius: 0 0 3px 3px; }
-  .linked.vertical .entry:only-child, .linked.vertical .entry:only-child:last-child:focus, .linked.vertical .button:only-child {
-    border-radius: 3px;
-    border-style: solid; }
+  border-top-style: none;
+  border-radius: 0; }
+
+.linked.vertical .entry:first-child, .linked.vertical .entry:first-child:last-child:focus, .linked.vertical .button:first-child, .linked.vertical > GtkComboBoxText:first-child > .button,
+.linked.vertical > GtkComboBox:first-child > .button {
+  border-style: solid;
+  border-radius: 3px 3px 0 0; }
+.linked.vertical .entry:last-child, .linked.vertical .button:last-child, .linked.vertical > GtkComboBoxText:last-child > .button,
+.linked.vertical > GtkComboBox:last-child > .button {
+  border-radius: 0 0 3px 3px; }
+.linked.vertical .entry:only-child, .linked.vertical .entry:only-child:last-child:focus, .linked.vertical .button:only-child, .linked.vertical > GtkComboBoxText:only-child > .button,
+.linked.vertical > GtkComboBox:only-child > .button {
+  border-radius: 3px;
+  border-style: solid; }
 
 .menuitem.button.flat, .header-bar .menuitem.titlebutton.button,
 .titlebar .menuitem.titlebutton.button,
index 7b9c0c45fc18ed20c041347c4ec8c428710d2c06..5c851ddf6e6cf4bcdb92c9eafed4d09b6ff7fee7 100644 (file)
@@ -1184,17 +1184,23 @@ GtkCalendar.header .inline-toolbar GtkToolButton:backdrop:only-child > .button.t
   border-radius: 3px;
   border-style: solid; }
 
-.linked.vertical .entry, .linked.vertical .entry:focus, .linked.vertical .entry:insensitive, .linked.vertical .entry:insensitive:backdrop, .linked.vertical .entry:backdrop, .linked.vertical .entry:last-child:focus, .linked.vertical .button, .linked.vertical .button:hover, .linked.vertical .button:active, .linked.vertical .button:checked, .linked.vertical .button:backdrop {
+.linked.vertical .entry, .linked.vertical .entry:focus, .linked.vertical .entry:insensitive, .linked.vertical .entry:insensitive:backdrop, .linked.vertical .entry:backdrop, .linked.vertical .entry:last-child:focus, .linked.vertical .button, .linked.vertical .button:hover, .linked.vertical .button:active, .linked.vertical .button:checked, .linked.vertical .button:backdrop, .linked.vertical > GtkComboBoxText > .button,
+.linked.vertical > GtkComboBox > .button {
   border-left-style: solid;
-  border-top-style: none; }
-  .linked.vertical .entry:first-child, .linked.vertical .entry:first-child:last-child:focus, .linked.vertical .button:first-child {
-    border-style: solid;
-    border-radius: 3px 3px 0 0; }
-  .linked.vertical .entry:last-child, .linked.vertical .button:last-child {
-    border-radius: 0 0 3px 3px; }
-  .linked.vertical .entry:only-child, .linked.vertical .entry:only-child:last-child:focus, .linked.vertical .button:only-child {
-    border-radius: 3px;
-    border-style: solid; }
+  border-top-style: none;
+  border-radius: 0; }
+
+.linked.vertical .entry:first-child, .linked.vertical .entry:first-child:last-child:focus, .linked.vertical .button:first-child, .linked.vertical > GtkComboBoxText:first-child > .button,
+.linked.vertical > GtkComboBox:first-child > .button {
+  border-style: solid;
+  border-radius: 3px 3px 0 0; }
+.linked.vertical .entry:last-child, .linked.vertical .button:last-child, .linked.vertical > GtkComboBoxText:last-child > .button,
+.linked.vertical > GtkComboBox:last-child > .button {
+  border-radius: 0 0 3px 3px; }
+.linked.vertical .entry:only-child, .linked.vertical .entry:only-child:last-child:focus, .linked.vertical .button:only-child, .linked.vertical > GtkComboBoxText:only-child > .button,
+.linked.vertical > GtkComboBox:only-child > .button {
+  border-radius: 3px;
+  border-style: solid; }
 
 .menuitem.button.flat, .header-bar .menuitem.titlebutton.button,
 .titlebar .menuitem.titlebutton.button,